
Chapter 33. Using Web Service APIs

From the website:

  Killer Game Programming in Java
  http://fivedots.coe.psu.ac.th/~ad/jg

  Dr. Andrew Davison
  Dept. of Computer Engineering
  Prince of Songkla University
  Hat yai, Songkhla 90112, Thailand
  E-mail: ad@fivedots.coe.psu.ac.th


If you use this code, please mention my name, and include a link
to the website.

Thanks,
  Andrew

============================

An application which sends a book title to eBay's Web 
service, and gets back a PNG image of the book's cover. 
	- uses eBay's Shopping API


This directory contains:

  * SearchEBay.java
	- does the search 
        - you MUST MODIFY the APP_ID line
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
	- use the key assigned to you by eBay (see "Getting Keys" below)

  * WebUtils.java
	- useful support methods 

  * NamespaceContextImpl.java
	- for XML namespace contexts (by Deepak Vohra)


There is 1 batch file:

  * UseProxy.bat
     - you MUST MODIFY its proxy settings to suit you
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

----------------------------
Getting Keys

Join eBay's developers programme at https://developer.ebay.com/, by clicking on 
the "Join Now" button. 

After entering your details, several keys are generated, 
including an AppID which you need for querying eBay. 


----------------------------
API Information

eBay Shopping API in Java: 
  http://developer.ebay.com/developercenter/java/shopping/

----------------------------
Compilation:

  > javac *.java

----------------------------
Execution:

  > UseProxy SearchEBay <book title>
e.g.

  > UseProxy SearcheBay "killer game programming in java"


It will download a book cover, and create a XML file called temp.xml

---------
Last updated: 1st July 2009
